home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / Moof / DAs, INITs, CDEVs, etc / ShowINIT / ShowIcon.a < prev    next >
Text File  |  1987-11-06  |  1KB  |  62 lines

  1.     PRINT    OFF
  2. ; ShowIcon.a
  3.  
  4. ; This is designed to be used with ShowINIT, the utility that displays 
  5. ;    icons when an INIT file runs.
  6.  
  7. ; This code is used to construct another INIT file, which can be placed
  8. ;    in any *existing* INIT file.  This new INIT simply finds out
  9. ;    what its ID is, and calls ShowINIT with that ID.  By making the
  10. ;    ID of this INIT equal that of the ICN# you want to display, you
  11. ;    can add the ShowINIT feature to any INIT file.
  12.  
  13. ; Larry Rosenstein
  14. ; Apple Computer Inc.
  15.  
  16.     INCLUDE    'Traps.a'
  17.     INCLUDE    'ToolEqu.a'
  18.     INCLUDE    'QuickEqu.a'
  19.     INCLUDE 'Defs.a'
  20.     PRINT    ON
  21.  
  22. ShowICON    MAIN
  23.  
  24. stackFrame    RECORD    {A6Link}
  25.                 name:        DS.B    256
  26.                 theID:        DS.W    1
  27.                 theTYPE:    DS.L    1
  28.                 A6Link:        DS.L    1
  29.                 return:        DS.L    1
  30.                 theEvent:    DS.L    1
  31.                 eventMask:    DS.W    1
  32.                 
  33. localSize    EQU        A6Link-name
  34.  
  35.             ENDR
  36.         
  37.  
  38.         WITH stackFrame
  39.         
  40.         IMPORT    ShowINIT
  41.         
  42.         LINK    A6,#-localSize
  43.         
  44.         MOVE.L    A0,-(SP)        ; for later _HUnlock
  45.         _HLock                    ; ourself
  46.         
  47.         MOVE.L    (SP),-(SP)        ; handle to ourself
  48.         PEA        theID(A6)
  49.         PEA        theType(A6)
  50.         PEA        name(A6)
  51.         _GetResInfo
  52.         
  53.         MOVE.W    theID(A6),-(SP)
  54.         MOVE.W    #-1,-(SP)
  55.         JSR        ShowINIT
  56.         
  57.         MOVE.L    (SP)+,A0
  58.         _HUnlock                ; as promised
  59.         
  60.         UNLK    A6
  61.         RTS
  62.     END